set1 ={1,2,3,4,5,6,7,8,9,10}
set_train = set()  # 创建空集合的方式, {}这是创建空字典
set_new = {5,2,8,11,20}
num = 0

for i in set1:
    if num==5:
        break
    set_train.add(i)
    num+=1

# 集合的交并补
set1


print("没有参加培训课程的员工ID集合:",set1-set_train)
set1.update(set_new)
print(set1)
print("既参加了培训又是新加入公司的员工:",set_new & set_train)